Knowing how to wire and code a button opens up lots of possibilities for using the variety of switches and buttons out there!
Microswitches can be used in machines or robots to detect a "crash", where something hits something else!
Magnetic contact switches can be used to detect if a door is opened:
Toggle switches can be set on or off:
See the digital input example for details of how to code them.